
<template>
  <div class="parent-card">
    <div class="left">
      <div class="imgs" v-infinite-scroll="load" style="overflow:auto">
        <div v-for="item in 10" class="img-card">
          <div class="tag tag-return" v-if="item % 2 == 0">
            <div class="text">RETURN</div>
          </div>
          <div class="tag tag-review" v-else-if="item % 3 == 0">
            <div class="text">REVIEW</div>
          </div>
          <div class="left-content">
            <el-image src="https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg" class="avatar" />
            <div class="country">
              <el-image src="/src/assets/images/america.png" class="flag" />
              <div class="text">India</div>
            </div>
            <div class="host-id">
              Agent ID:10086
            </div>
          </div>

        </div>
      </div>
    </div>
    <div class="right">
      <div class="content">
        <div class="top">
          <div>
            <div class="country">
              <el-image src="/src/assets/images/america.png" class="flag" />
              <div class="text">India</div>
            </div>
            <div class="host-id">
              Agent ID:10086
            </div>
          </div>
          <el-button class="reject-all">Reject All</el-button>
        </div>
        <div class="center">
          <div class="story-card"
            style="background-image: url('https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg');background-size: cover;">
            <div class="btns">
              <el-button class="reject">Reject</el-button>
              <el-button class="accept">Accept</el-button>
            </div>
          </div>
          <div class="info">
            <table>
              <tr>
                <td>Host ID</td>
                <td>9822222</td>
                <td>Agent ID</td>
                <td class="color-red">10232322</td>
              </tr>
              <tr>
                <td>Birthday</td>
                <td>2002-08-26 / Age: 25</td>
                <td>Region</td>
                <td>
                  <div class="country color-red">
                    <el-image src="/src/assets/images/america.png" class="flag" />
                    <div class="text">India</div>
                  </div>
                </td>
              </tr>
              <tr>
                <td>Language</td>
                <td>Filipino, لسان عثمانى</td>
                <td>Register Time</td>
                <td>
                  <div>
                    2023-09-12 13:34:34 (UTC+5:30)
                  </div>
                  <div class="color-red">7Hours ago</div>
                </td>
              </tr>
              <tr>
                <td>Nickname</td>
                <td colspan="2">Host ID</td>
                <td style="background: #E6E6E6;">
                  <el-button class="reject">Reject</el-button>
                  <el-button class="accept">Accept</el-button>
                </td>
              </tr>
              <tr>
                <td>About Me</td>
                <td colspan="2">The 5pm timing for the event is unusual. The company typically hosts its launches in the
                  morning. The “Scary Fast” branding, </td>
                <td style="background: #E6E6E6;">
                  <el-button class="reject">Reject</el-button>
                  <el-button class="accept">Accept</el-button>
                </td>
              </tr>
            </table>
          </div>
        </div>
        <div class="title">Album</div>
        <div class="album">
          <div class="album-cards">
            <div class="album-card"
              style="background-image: url('https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg');background-size: cover;"
              v-for="i in 10">
              <div class="btns">
                <el-button class="reject">Reject</el-button>
                <el-button class="accept">Accept</el-button>
              </div>
            </div>
          </div>
        </div>
        <div class="title story-title">Story</div>
        <div class="album">
          <div class="album-cards">
            <div class="story-card"
              style="background-image: url('https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg');background-size: cover;"
              v-for="i in 10">
              <div class="btns">
                <el-button class="reject">Reject</el-button>
                <el-button class="accept">Accept</el-button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
const load = () => {
  console.log("滚动到底部了")
}
</script>
<style scoped lang="scss">
.parent-card {
  border-radius: 16px;
  // overflow-y: scroll;
  // max-height: calc(100vh - 330px);
  // min-height: calc(100vh - 330px);
  // max-height: 2514px;
  display: flex;

  .left {
    height: calc(100vh - 330px);
    width: 304px;
    display: flex;
    justify-content: space-between;
    overflow-x: hidden;
    overflow-y: auto;

    .imgs {
      margin: 0 auto;

      .img-card {
        width: 240px;
        height: 240px;
        margin-bottom: 24px;
        margin-right: 16px;
        border-radius: 16px;
        background: #FFF6F9;
        text-align: center;
        position: relative;

        .left-content {
          position: absolute;
          left: 0;
          right: 0;
          margin: 0 auto;
          bottom: 0;
          z-index: 100;
        }

        .tag-review {
          background: rgba(250, 74, 130, 1);
        }

        .tag-review:before,
        .tag-return::before {
          content: "";
          width: 0;
          height: 0;
          position: absolute;
          left: 0;
          top: 0;
          border-bottom: 48px solid #FFF6F9;
          border-left: 120px solid transparent;
        }

        .tag-return {
          background: black;
        }

        .tag {
          width: 120px;
          height: 48px;
          color: white;
          font-size: 12px;
          border-top-left-radius: 16px;

          .text {
            transform: rotate(-20deg);
            position: absolute;
            left: 3px;
            top: 12px;
          }
        }



        .avatar {
          width: 120px;
          height: 120px;
          border-radius: 50%;
          margin-top: 24px;
        }


        .host-id {
          font-family: Montserrat;
          font-size: 14px;
          font-weight: 500;
          letter-spacing: 0em;
          margin-bottom: 30px;
        }
      }

    }
  }

  .right {
    width: calc(100vw - 304px);
    max-height: calc(100vh - 330px);
    overflow-y: scroll;

    .content {
      margin: 24px 48px;

      .top {
        display: flex;
        justify-content: space-between;
        margin-bottom: 24px;
        height: 70px;
        border-bottom: 1px solid rgba(39, 60, 98, 0.2);

        .country {
          text-align: left;
          margin-top: 0;
        }

        .reject-all {
          width: 160px;
          height: 48px;
          top: 60px;
          border-radius: 12px;
          background: rgba(250, 74, 130, 1);
          color: white;
          margin-top: 4px;
        }
      }
    }
  }
}

.left,
.right {
  margin: 24px 0;
  // max-height: 2514px;

}

.country {
  margin: 14px 0 10px 0;

  .flag {
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-right: 8px;
  }

  .text {
    font-family: Montserrat;
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0em;
  }
}

.center {
  height: 400px;
  margin: 23px 0 48px 0;
  display: flex;
}

.album,
.story {
  // max-height: 925px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.05);
  padding: 24px 46px;
  // overflow-y: scroll;
}

.story-card:nth-child(4n),
.album-card:nth-child(4n) {
  margin-right: 0
}

.story-card,
.album-card {
  width: 300px;
  height: 400px;
  border-radius: 16px;
  margin-bottom: 48px;
  position: relative;

  margin-right: 48px;


}

.album-cards {
  display: flex;
  flex-wrap: wrap;
  // justify-content: space-between;
  // .album-card:nth-child(2n), .album-card:nth-child(3n){
  //   margin-left: 48px;
  // }
}


.title {
  font-family: Montserrat;
  font-size: 24px;
  font-weight: 700;
  line-height: 29px;
  letter-spacing: 0em;
  text-align: left;
  margin-bottom: 22px;
}

.story-title {
  margin-top: 48px;
}

td:nth-child(2n-1) {
  width: 160px;
  font-family: Montserrat;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0em;
  background: #dfdede;
}

td {
  height: 77px;
  text-align: center;
}

td:nth-child(2n) {
  background: #E6E6E6;
  width: 384px;
  font-size: 18px;
}

.color-red {
  color: rgba(255, 0, 0, 1);
}

table {
  border-spacing: 1px;
  /*设置表格单元格之间的间距*/
  border-collapse: separate;
  /*让单元格边框与表格边框分离*/
}

.btns {
  width: 276px;
  display: flex;
  justify-content: space-between;
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  margin: 0 auto;
}

.reject,
.accept {
  border: 0;
  width: 130px;
  height: 48px;
  border-radius: 12px;
}

.reject {
  color: rgba(250, 74, 130, 1);
}

.accept {
  color: white;
  background: rgba(0, 132, 255, 1);

}
</style>